<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JohnsonSmile的博客</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {{template "comm/link.html"}}
</head>
<body class="lay-blog">
{{template "comm/header.html" .}}
<div class="container-wrap">
    <div class="container">
        <div class="contar-wrap">
            <h4 class="item-title">
                <p><i class="layui-icon layui-icon-speaker"></i>公告：<span>欢迎来到我的轻博客</span></p>
            </h4>
            {{range .notes}}
                <div class="item">
                    <div class="item-box  layer-photos-demo1 layer-photos-demo">
                        <h3><a href="/details">{{.Title}}</a></h3>
                        <h5>发布于：<span>{{date .UpdatedAt "Y-m-d H:i:s"}}</span></h5>
                        <p>{{.Summary}}</p>
                        <img src="../static/images/item.png" alt="">
                    </div>
                    <div class="comment count">
                        <a href="/details#comment">评论</a>
                        <a href="javascript:;" class="like">点赞</a>
                    </div>
                </div>
            {{end}}
        </div>
        <div class="item-btn">
            {{if gt .page 1}}
                <button class="layui-btn layui-btn-normal" onclick="window.location.href='/?page={{add .page -1}}&title={{.title}}'">上一页</button>
            {{end}}
            {{if lt .page .totPage}}
                <button class="layui-btn layui-btn-normal" onclick="window.location.href='/?page={{add .page 1}}&title={{.title}}'">下一页</button>
            {{end}}
        </div>
    </div>
</div>
{{template "comm/footer.html"}}
</body>
</html>